package com.fjnu.controller;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.apache.log4j.LogManager;
import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.fjnu.controller.common.BaseController;
import com.fjnu.entities.ReserveLand;
import com.fjnu.service.IReserveLandService;
@Controller
@RequestMapping(value="/user")
public class ReserveLandController extends BaseController{
	private static Logger logger =LogManager.getLogger(ReserveLandController.class);
	@Autowired
	private IReserveLandService reserveLandService;
	@RequestMapping(value="/findReserveLand")
	@ResponseBody
	public Map<String,Object> findReserveLand(){
		logger.info("查询存放地点列表");
		if(!init().get(STATUS).equals(SUCCESS))
			return getData();
		List<ReserveLand> list = reserveLandService.findReserveLand();
		//Map<String,Object> map = new HashMap<String,Object>();
		//map.put("data", list);
		//map.put("success", true);
		put("data",list);
		return getData();
	};
}
